package org.opens.netty.chatServer.server.session;

import org.opens.netty.chatServer.server.session.impl.GroupSessionMemoryImpl;

public class GroupSessionFactory {

    private static GroupSession groupSession;

    public static GroupSession getGroupSession() {
        if (groupSession == null) {
            synchronized (GroupSessionFactory.class) {
                if (groupSession == null) {
                    groupSession = new GroupSessionMemoryImpl();
                }
            }
        }
        return groupSession;
    }

}
